<#macro script_import>
</#macro> 
<#macro script>
</#macro> 
<#macro css_import>
</#macro> 
<#macro css>
</#macro> 
<#macro layout>
<!DOCTYPE html>
<html>
<head>
  <title>${WEB_TITLE!WEB_NAME!} - ${WEB_SUBTITLE!'欢迎使用JPress'}</title>
  <meta name="keywords" content="${META_KEYWORDS!}">
  <meta name="description" content="${META_DESCRIPTION!}">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <link rel="shortcut icon" href="${CTPATH}/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="${CTPATH}/assets/css/app.css"/>
  <link rel="stylesheet" href="${CTPATH}/assets/font-awesome/css/font-awesome.min.css"/>
  <link rel="stylesheet" href="${CTPATH}/assets/mediaelement/mediaelementplayer.css" />
  <link rel="stylesheet" href="${CTPATH}/assets/jqcloud/jqcloud.css" />
  <@css_import />
  <#if css ??>
  	<style type="text/css">
  	<@css />
  	</style>
  </#if>
</head>
<body class="blog-body">
<header class="x-pc-width x-layout-100">
  <!-- -->
  <div class="x-layout-100 jblog-link">
    <div class="jblog-link-content">
      <ul class="jblog-link-content-left">
          <li class="website-logo">
              <a href="${CPATH}">
                <img src="${CTPATH}/assets/images/guavaer.png">
                  <span>${WEB_NAME!}</span>
              </a>
          </li>
        <li class="x-part-border-left display"><a class="x-padding-left-rem1 x-padding-right-rem1" href="${CPATH!}/">首页</a></li>
        <li class="x-padding-left-rem1 x-padding-right-rem1 display"><a href="${CPATH!}/about">联系我们</a></li>
      </ul>
      <ul class="jblog-link-content-right">
          <li class="display">
              <a href="javascript:;" id="qq_show" class="myqq">
                  <i class="fa fa-qq" aria-hidden="true"></i>
                  <img src="${CTPATH}/assets/images/qqqr.jpg" style="display: none;width: 200px;position: absolute;z-index: 9999;border:1px solid #ddd;" width="200px">
              </a>
          </li>
          <li class="x-part-border-left">
              <a href="javascript:;" id="weixin_show">
                  <i class="fa fa-weixin" aria-hidden="true"></i>
                  <img src="${CTPATH}/assets/images/weixinqr.jpg" style="display: none;width: 200px;position: absolute;z-index: 9999;border:1px solid #ddd;" width="200px">
              </a>
          </li>
          <li><a href="https://weibo.com/superbugs" target="_blank"><i class="fa fa-weibo" aria-hidden="true"></i></a></li>
          <li><a href="https://github.com/belonk" target="_blank"><i class="fa fa-github" aria-hidden="true"></i></a></li>
      </ul>
    </div>
  </div>
  <!-- -->
  <div class="x-layout-100 jblog-link-logo">
    <div class="jblog-link-logo-content">
      <!--<div class="jblog-link-logo-image"><a href="${CPATH}/">${WEB_NAME!}</a></div>-->
      <div class="jblog-link-logo-adv">
	      <a href="${OPTION('jpblog_banner_url')!'#'}">
	      	<img src="${CPATH}${OPTION('jpblog_banner_image')!TPATH+'/assets/images/banner.jpg'}"/>
	      </a>
      </div>
    </div>
  </div>
  <!-- -->
  <div class="jblog-nav">
    <div class="jblog-nav-content">
      <ul>
      	<li><a href="${CPATH}/">首页
      	<#if "/" == REQUEST.requestURI!>
      	<span class="x-a-border"></span>
      	</#if>
      	</a>
      	</li>
      	<@jp.menus>
        	<#list menus as menu>
        		<li >
        		<a  href="${menu.url!}">
        		${menu.title!}
        		<#if menu.isActive() >
        			<span class="x-a-border"></span>
        		</#if>
        		</a>
        		</li>
        	</#list>
        </@jp.menus>
      </ul>
    </div>
  </div>
</header>
<#nested> 
<footer class="footer x-pc-width x-sm-footer">
  <p>${OPTION('web_copyright')!'暂未填写版权信息'}</p>
</footer>
<div style="display: none;">
${OPTION('jpblog_statistical_code')!}
</div>
<@script_import />
  <script src="${CTPATH}/assets/js/jquery-2.1.1.min.js"></script>
  <script src="${CTPATH}/assets/mediaelement/mediaelement-and-player.min.js"></script>
  <script src="${CTPATH}/assets/js/jquery.tagcanvas.min.js"></script>
  <script src="${CTPATH}/assets/jqcloud/jqcloud-1.0.4.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<script type="text/javascript">
<@script />
$(document).ready(function() {
   // 显示QQ、weixin二维码
   $('#qq_show,#weixin_show').mouseover(function() {
       var $this = $(this);
       var img = $this.find('img');
       img.css('top', $this.offset().top + 30);
       img.css('left', $this.offset().left - 165);
       img.show();
   }).mouseout(function() {
       var $this = $(this);
       var img = $this.find('img');
       img.hide();
   });
   // 显示赞赏图片
    $('#zan_btn').click(function() {
        var $this = $(this);
        var img = $this.find('img');
        if (img.is(":hidden")) {
            img.css('top', $this.offset().top + 40);
            img.css('left', $this.offset().left - 195);
            img.show();
        } else {
            img.hide();
        }
    })
    $('#zan_btn img').click(function() {
        var $this = $(this);
        $this.hide();
    });

   // 3D旋转标签
   // var w = $('#tagCanvasContainer').width();
   // $('#tagCanvas').attr("width", w);
   // $('#tagCanvas').attr("height", w);
   // if (!$('#tagCanvas').tagcanvas({
   //         textColour: '#19b5fe',
   //         outlineColour: '#0df',
   //         reverse: true,
   //         depth: 0.8,
   //         textFont: "Microsoft YaHei, Open Sans",
   //         weight: false,
   //         maxSpeed: 0.05
   //     }, 'tags')
   // ) {
   //     $('#tagCanvasContainer').hide();
   // }

    var wordArray = $('#tags a').map(function () {
        var a = $(this);
        return {'text': a.text(), 'link': a.attr('href')};
    });
    var len = wordArray.length;
    var w = 1;
    for (var i = 0; i < wordArray.length; i++) {
        var obj = wordArray[i];
        if (w >= 10) w = 1;
        if (i % ++w == 0) {
            obj.weight = parseInt(Math.random() * 2 + 1) + w;
        } else {
            obj.weight = parseInt(Math.random() * 2 + 1);
        }
    }
    $('#tags-cloud').jQCloud(wordArray);
});

(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
</body>
</html>
</#macro>